﻿<%@ Page Title="ADMINISTRAR PERSONAL" Language="vb" AutoEventWireup="false" MasterPageFile="~/01ADMINISTRADOR/MPAdmin.Master" CodeBehind="admin-personal.aspx.vb" Inherits="ASI_2_UFG.WebForm4" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="tableform">
        <fieldset>
            <legend>Personal</legend>
        </fieldset>
        <table>
            <tr>
                <td>
                    <asp:Label ID="label1" runat="server" Text="Personal ID"></asp:Label> 
                </td>
                <td>
                    <asp:TextBox ID="txtid_personal" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
               <td>
                    <asp:Label ID="label2" runat="server" Text="Carnet"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txt_carnet" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="label3" runat="server" Text="Apellidos"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txt_apellido" runat="server"></asp:TextBox>
                </td>
            </tr>    
            <tr>
                <td>
                    <asp:Label ID="label4" runat="server" Text="Nombres"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txt_nombre" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="label5" runat="server" Text="Email"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txt_email" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="label6" runat="server" Text="Teléfono"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txt_telefono" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="label7" runat="server" Text="Usuario"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txt_usuario" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="label8" runat="server" Text="Clave"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txt_clave" runat="server"></asp:TextBox>
                </td>
            </tr>
            
            <tr>
               <td>
                <asp:Label ID="label9" runat="server" Text="Estado"></asp:Label>
               </td>
               <td>
               &nbsp;<asp:DropDownList ID="Estado" runat="server">
                       <asp:ListItem Value="a">Activo</asp:ListItem>
                       <asp:ListItem Value="i">Inactivo</asp:ListItem>
                   </asp:DropDownList>
               </td>
            </tr>
            
            <tr>
               <td>
                <asp:Label ID="label10" runat="server" Text="Rol"></asp:Label>
               </td>
               <td>
               &nbsp;<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                       ConnectionString="<%$ ConnectionStrings:ASI2UFG %>" 
                       SelectCommand="SELECT TOP 3 [id_rol], [nombre] FROM [ROL] ORDER BY [ID_ROL] ASC"></asp:SqlDataSource>
                   <asp:DropDownList ID="Rol" runat="server" DataSourceID="SqlDataSource1" 
                       DataTextField="nombre" DataValueField="id_rol">                
                   </asp:DropDownList>
               </td>
            </tr>                                 
            <tr>
                <td colspan="2">
                    
                    <asp:ImageButton ID="btninsertar" runat="server" CssClass="image" 
                        ImageUrl="~/IMAGES/funct_add.png" />
                    <asp:ImageButton ID="btnModificar" runat="server" CssClass="image" 
                        ImageUrl="~/IMAGES/funct_refresh.png" />
                    <asp:ImageButton ID="btnEliminar" runat="server" CssClass="image" 
                        ImageUrl="~/IMAGES/funct_delete.png" />
                    
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:Label ID="lbmensaje" runat="server" Text=""></asp:Label></td>
            </tr>                  
        </table>
        <table>
            <tr>
                <td colspan="2">
                
                    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:ASI2UFG %>" 
                        SelectCommand="SELECT [id_personal], [CARNET], [apellidos], [nombres], [email], [telefono], [usuario], [clave], [estado], [id_rol] FROM [PERSONAL]">
                    </asp:SqlDataSource>
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                        CellPadding="4" DataKeyNames="id_personal" DataSourceID="SqlDataSource2" 
                        ForeColor="#333333" GridLines="None">
                        <RowStyle BackColor="#EFF3FB" />
                        <Columns>
                            <asp:BoundField DataField="id_personal" HeaderText="id_personal" 
                                InsertVisible="False" ReadOnly="True" SortExpression="id_personal" />
                            <asp:BoundField DataField="CARNET" HeaderText="CARNET" 
                                SortExpression="CARNET" />
                            <asp:BoundField DataField="apellidos" HeaderText="apellidos" 
                                SortExpression="apellidos" />
                            <asp:BoundField DataField="nombres" HeaderText="nombres" 
                                SortExpression="nombres" />
                            <asp:BoundField DataField="email" HeaderText="email" SortExpression="email" />
                            <asp:BoundField DataField="telefono" HeaderText="telefono" 
                                SortExpression="telefono" />
                            <asp:BoundField DataField="usuario" HeaderText="usuario" 
                                SortExpression="usuario" />
                            <asp:BoundField DataField="clave" HeaderText="clave" SortExpression="clave" />
                            <asp:BoundField DataField="estado" HeaderText="estado" 
                                SortExpression="estado" />
                            <asp:BoundField DataField="id_rol" HeaderText="id_rol" 
                                SortExpression="id_rol" />
                        </Columns>
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <EditRowStyle BackColor="#2461BF" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>
                
                </td>
            
            </tr>
        </table>
</div>
</asp:Content>
